Shortest subset sum of arr dynamic programming